<template>
	<view>
		<free-nav-bar showBack title="公告详情"></free-nav-bar>
		<view class="font-12 pl-2 pt-2 text-999999">发布时间：{{time}}</view>
		<view class="mt-3" style="width: 100vw;text-align:center;font-size: 1.3rem; font-weight: bold;">{{title}}</view>
		<view class="pl-2 pr-2 mt-6">
			<rich-text :nodes="richText"></rich-text>
		</view>
	</view>
</template>

<script>
	import $H from '@/common/free-lib/request.js';
	import freeNavBar from "@/components/free-ui/free-nav-bar.vue"
	export default {
		components: {
			freeNavBar
		},
		data() {
			return {
				time:undefined,
				title:undefined,
				richText: '<div><p style="color:red;">这是一段富文本内容</p></div>'
			}
		},
		onLoad(option) {
			console.log("id",option)
			this.getNotice(option.id);
		},
		computed: {
			richTextNodes() {
				return this.parseHTML(this.htmlContent);
			}
		},
		methods: {
			getNotice(id) {
				$H.get('/basisInform/platformNotice/queryById', {
						id
					}, {
						
					}).then(res=>{
						this.time = res.result.updateTime;
						this.richText = res.result.content;
						this.title = res.result.title;
					})
				$H.get('/basisInform/platformNotice/upper/clickRead', {
						id
					}, {});
					
			}
		}
	}
</script>

<style>
</style>